package io.renren.modules.exam.tiMuManage.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.modules.exam.tiMuManage.dao.TiMuDao;
import io.renren.modules.exam.tiMuManage.entity.TiMuEntity;
import io.renren.modules.exam.tiMuManage.service.TiMuService;
import org.apache.ibatis.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("TiMuService")

public class TiMuServiceImpl implements TiMuService{
    @Autowired
    private TiMuDao tiMuDao;
    @Override
    public TiMuEntity queryByQuestion(int q_id) {
        System.out.println("TiMuServiceImpl q_id="+q_id);
        System.out.println("TiMuServiceImpl TiMuEntity="+tiMuDao.queryByQuestion(q_id));
        return tiMuDao.queryByQuestion(q_id);
    }




    @Override
    public List<TiMuEntity> queryByQuestionMany(String q_typeDescribe,String q_typeFenlei) {
       // String qid="'"+q_id+"'";
        return tiMuDao.queryByQuestionMany(q_typeDescribe,q_typeFenlei);
    }

    @Override
    public int insertTimu(String q_typeDescribe, int q_typeId, String ans_id, String q_score, String ans_id1, String ans_id2, String ans_id3, String ans_id4) {
      int rinsen=tiMuDao.insertTimu(q_typeDescribe,q_typeId,ans_id,q_score,ans_id1,ans_id2,ans_id3,ans_id4);
      return rinsen;
    }


}
